﻿@{
    ViewBag.Title = "ShowGroupDetail";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@model WebBookmarkUI.Models.UIGroupInfo

<script>
    var showGroupUserList = "@Url.Action("ShowGroupUserList")";
    var groupID = '@Model.GroupInfoID';
    var applyToGroupURL = "@Url.Action("ApplyToGroup")";
    var showGroupUserListNotPass = "@Url.Action("ShowGroupUserListNotPass")";
    var passGroupUserURL = "@Url.Action("PassGroupUser")";
    var removeGroupUserURL = "@Url.Action("RemoveGroupUser")";

    var rejectGroupUserURL ="@Url.Action("RejectGroupUser")";
    

</script>
<script src="~/DomainJS/showgroupdetail.js"></script>

@if(Model!=null)
{
    var loginUid = WebBookmarkUI.UILoginHelper.GetUIDFromHttpContext(this.Context);
    <div class="am-cf am-padding">
    <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">@Model.GroupName</strong> / <small>
        <a href='@Url.Content("~/UserInfo/ShowUserDetail?uid="+Model.CreateUesrID)'>@Model.CreateUesrInfo.UserName</a></small>
 
    @if (Model.CreateUesrID != loginUid &&
        WebBookmarkBo.Model.BizGroupUser.LoadByUserIDAndGroupID(loginUid, Model.GroupInfoID) == null)
    {
        <button class="am-btn-primary" data-id='@Model.GroupInfoID' id="applytogroup" onclick="ApplyToGroup()">申请加入</button>
    }
    </div>
</div>
<div class="am-cf" style="margin-left:1%">
    <div class="">创建日期：@Model.CreateTime &nbsp;&nbsp;&nbsp;&nbsp;</div>
    <div class="">简介：@Model.GroupIntro</div>
</div>
<div class="mod-footer">
    <div class="am-tabs" data-am-tabs="">
        <ul class="am-tabs-nav am-nav am-nav-tabs aw-nav-tabs">
            <li class="am-active"><a href="#" id="groupuser" data-id='@Model.GroupInfoID'>群组成员 <span id="groupuserload"></span></a></li>
            <li class=""><a href="#" id="groupusernopass" data-id='@Model.GroupInfoID'>待审核申请<span id="groupusernopassload"></span></a></li>
            @*<li ><a href="#" id="groupinfo" data-id='@Model.GroupInfoID'>相关资料 <span id="groupinfoload"></span></a></li>*@
        </ul>

        <div class="am-tabs-bd aw-user-center-tab" style="touch-action: pan-y; -webkit-user-select: none; -webkit-user-drag: none; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); margin-left:2%" >
            <div class="am-active am-in" id="overview">

            </div>
        </div>
    </div>
</div>
    
}


<div class="am-modal am-modal-confirm" tabindex="-1" id="remover-confirm">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">移除用户</div>
        <div class="am-modal-bd">
            你，确定要把此用户从这个群组里面移除掉吗？
        </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>确定</span>
        </div>
    </div>
</div>